<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script>
			var t = 10; //设定跳转的时间
			setInterval("refer()", 1000); //启动1秒定时
			function refer() {
				if (t == 0) {
					location = "http://www.baidu.com"; //跳转的地址
				}
				document.getElementById("show").innerHTML = "" + t + "秒后跳转转到baidu"; // 显示倒计时
				t--; // 计数器递减
				}
		</script>
	</head>
	<body>
		<p id="show"></p>
	</body>
</html>
